Release 10.1A: OpenEdge Development:
Progress Dynamics Web Development Guide


Invoking server-side business logic from the client

If you want server-side business logic to respond to some event on the DHTML client, you must define JavaScript event handlers for dynamic viewer fields. After creating the event handler and saving it to a file, you must add its filename to the JavaScriptFile attribute for the container. (See the "Customizing with JavaScript" section section in Chapter 5, " Customizing with Dynamic HTML.")

The event can be any supported event for the viewer field type. For example:

function blctest(val1, val2) { 
var call, target, flags, params; 
call   = 'proc1'; // procedure or function to run 
target = 'ry\test\foo.p'; //program to run 
flags  = 's'; // Dynamic Call Wrapper flags 
params = "input character '" + val1 + "'\t" +"input integer '" + val2 + "'"; 
apph.runOnServer(call,target,flags,params); 
} 

The apph.runOnServer function is a client-side equivalent to a server-side interface to the Dynamic Call Wrapper. For more information about the Dynamic Call Wrapper, see OpenEdge Development: ADM Reference .

I/O blocking

Progress Dynamics Web applications do not support user prompts or messages within business logic. Therefore, I/O blocking statements (where execution is suspended until some user action is completed) should be avoided in server-side business logic.

Output parameters

Business logic containing output parameters is not supported for Progress Dynamics Web applications. If your business logic contains output parameters, they must be wrapped within additional 4GL that can deal with output parameters.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095